<%--
  Created by IntelliJ IDEA.
  User: Administrator
  Date: 2020/10/5 0005
  Time: 17:53
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<%
    String basepath=request.getScheme()+"://"+
    request.getServerName()+":"+
            request.getServerPort()+
    request.getContextPath()+"/";
%>
<head>
    <title>Title</title>
    <base href="<%=basepath%>"/>
    <script src="static/js/jquery-3.4.1.js"></script>
    <script>
        $(function (){
            $("#btn").click(function (){
                $.ajax({
                    url:"json.do",
                    data:{
                        name:"张三",
                        age:20
                    },
                    type:"get",
                    success:function (resp){
                        alert(resp)
                    }
                })
            })
        })
    </script>
</head>
<body>
<p>第一个springmvc项目</p>
<p><form action="frist.do" method="post">
    姓名：<input type="text" name="rname">
    年龄：<input type="text" name="rage">
    <input type="submit" value="提交">
</form></p>
<button id="btn">发起ajax请求</button>
<a href="static/html/test.html"><img src="static/image/temg14.jpg" alt="图片无法显示"></a>

</body>
</html>
